home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / NewDocs / ObjectStructures.doc < prev    next >
Encoding:
Text File  |  1995-01-13  |  2.8 KB  |  85 lines

  1. Quick reference of some of the Object structures used by Precognition:
  2.  
  3. /* All 'objects' are derrived from this structrure, i.e. they have
  4. ** an 'isa' pointer as their first member.  The 'isa' pointer points
  5. ** to the 'PClass' structure for the object.
  6. **
  7. ** NOTE: PObjects do NOT need to have an PObjectName associated with
  8. ** them.  This field is used by the Application builder to attach
  9. ** a variable name.
  10. */
  11.  
  12. typedef struct PObject
  13.    {
  14.       const PClass *isa;  /* Points to the objects 'PClass' structure. */
  15.       char  *PObjectName; /* Used by interface builder. */
  16.    } PObject;
  17.  
  18.  
  19.  
  20. typedef struct GraphicObject
  21.    {
  22.       const PClass   *isa;
  23.       char    *PObjectName;
  24.       void    *Next;        /* Points to next GraphicObject in chain. */
  25.    } GraphicObject;
  26.  
  27.  
  28. typedef struct Interactor
  29.    {
  30.       const PClass             *isa;
  31.       char              *PObjectName;
  32.       void              *Next;   /* Points to next Interactor in chain. */
  33.       struct pcgWindow  *IaWindow; /* window where this interactor lives. */
  34.       Point              Location;
  35.       Point              Size;
  36.    } Interactor;
  37.  
  38.  
  39.   /*
  40.    ** NOTE: Interactor & pcgWindow have circular dependencies.
  41.    ** Each contain pointers to the other.
  42.    */
  43.  
  44.    /*
  45.    ** NOTE: Do *NOT* set these fields directly!  Instead, use the
  46.    ** supplied methods 'SetInteractorWindow()', 'SetLocation()',
  47.    ** 'SetSize()' etc.  There is more to setting the window/location/size
  48.    ** of a interactor than simply assigning to these fields.
  49.    */
  50.  
  51. typedef Interactor Valuator; /* same structure definition */
  52.  
  53. typedef struct pcgWindow
  54.    {
  55.       PClass                 *isa;
  56.       char                  *PObjectName;
  57.       void                  *Next;      /* Not used. */
  58.       struct pcgWindow      *IaWindow;  /* not used. */
  59.       Point                  Location;
  60.       Point                  Size;
  61.       struct NewWindow       NewWindow;
  62.       struct Window         *Window;
  63.       ULONG                  IDCMPFlags;
  64.       struct Interactor     *FirstInteractor;
  65.       struct GraphicObject  *FirstGraphic;
  66.       struct MsgPort        *SharedUserPort;
  67.       Menu                  *MenuStrip;
  68.    } pcgWindow;
  69.  
  70. /*
  71.    The field 'IDCMPFlags' maintains the current IDCMP values.  The field
  72.    NewWindow.IDCMPFlags contains the bare minimum IDCMP values that the
  73.    window must have.  (Other IDCMP flags are set automagically by adding
  74.    Interactors to the window.
  75.  
  76.    NOTE: If SharedUserPort is not NULL, it is assumed to be a pointer to
  77.    a valid MessagePort structure, and that the window is to use this
  78.    MessagePort as its UserPort instead of creating its own.
  79.  
  80.    This is useful for having multiple windows sharing one MessagePort.
  81.    (See the Amiga 1.3 RKMs:  Libraries and Devices, Chapter 7, page 171
  82.    for more details on sharing UserPorts.
  83.  */
  84.  
  85.